# Maintainer: AndyRTR <andyrtr at archlinux.org>

pkgname=beanshell
pkgver=2.1.0
pkgrel=1
pkgdesc="Small, free, embeddable, source level Java interpreter with object based scripting language features written in Java"
arch=('any')
url="https://github.com/beanshell/beanshell"
license=('Apache')
depends=('java-runtime')
provides=('bsh')
replaces=('beanshell2')
conflicts=('beanshell2')
source=("https://github.com/beanshell/beanshell/releases/download/$pkgver/bsh-${pkgver}.jar")
noextract=("${pkgname}-${pkgver}.jar")
sha512sums=('f29ec0b382e8648b9f7506cc976ac533d82a941986e0beab3464cd1659334d8f8369c139124591ba45306dc8c0eb7090bd915ece364cdd476dd929fde3da2c34')

# beanshell2 fork is dead
# http://stackoverflow.com/questions/26549307/current-state-of-beanshell
# https://github.com/stain/beanshell2 - google code got removed and only this fork is left and outdated 
# original url http://www.beanshell.org - unmaintained

# Fedora and our only package making use of it use the follow up of the old beanshell:
# https://github.com/beanshell/beanshell

package() {
  install -m755 -d "${pkgdir}"/usr/share/java/
  install -D -m644 "${srcdir}"/bsh-${pkgver}.jar "${pkgdir}"/usr/share/java/bsh.jar
}
